import VueRouter from 'vue-router'


import Home from './views/home/Home.vue'
import Vip from './views/vip/Vip.vue'
import Shop from './views/shop/Shop.vue'
import Search from './views/search/Search.vue'

import HomeNewsList from './views/home/childComps/news/HomeNewsList.vue'
import HomeNewsInfo from './views/home/childComps/news/HomeNewsInfo.vue'
import HomePhotoList from './views/home/childComps/photo/HomePhotoList.vue'
import HomePhotoInfo from './views/home/childComps/photo/HomePhotoInfo.vue'
import HomeGoodsList from './views/home/childComps/goods/HomeGoodsList.vue'
import HomeGoodsInfo from './views/home/childComps/goods/HomeGoodsInfo.vue'
import HomeGoodsDesc from './views/home/childComps/goods/HomeGoodsDesc.vue'
import HomeGoodsComment from './views/home/childComps/goods/HomeGoodsComment.vue'


// 2.创建路由对象
var router = new VueRouter({
    routes: [
        { path: '/', redirect: '/home' },
        { path: '/home', component: Home },
        { path: '/vip', component: Vip },
        { path: '/shop', component: Shop },
        { path: '/search', component: Search },
        { path: '/home/newslist', component: HomeNewsList },
        { path: '/home/newsinfo/:id', component: HomeNewsInfo },
        { path: '/home/photolist', component: HomePhotoList },
        { path: '/home/photoinfo/:id', component: HomePhotoInfo },
        { path: '/home/goodslist', component: HomeGoodsList },
        { path: '/home/goodsinfo/:id', component: HomeGoodsInfo },
        { path: '/home/goodsdesc/:id', component: HomeGoodsDesc, name: 'goodsdesc' },
        { path: '/home/goodscomment/:id', component: HomeGoodsComment, name: 'goodscomment' }
    ],
    linkActiveClass: 'mui-active' //覆盖默认的路由高亮的类 router-link-active
})

export default router
